package com.kexio.enterprise.integration.message.query;

import com.kexio.enterprise.integration.message.enums.MessagePriority;
import com.kexio.enterprise.integration.message.enums.MessageStatus;
import com.kexio.enterprise.integration.message.enums.MessageType;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 消息查询条件
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class MessageQueryCriteria {
    private List<String> messageIds;
    private List<MessageType> types;
    private List<MessageStatus> statuses;
    private List<MessagePriority> priorities;
    private String sender;
    private String recipient;
    private String subject;
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private int limit;
    private int offset;
    private String sortBy;
    private boolean ascending;

    public MessageQueryCriteria() {
        this.limit = 100;
        this.offset = 0;
        this.sortBy = "createTime";
        this.ascending = false; // 默认降序，最新的在前
    }

    // Getters and Setters
    public List<String> getMessageIds() { return messageIds; }
    public void setMessageIds(List<String> messageIds) { this.messageIds = messageIds; }
    
    public List<MessageType> getTypes() { return types; }
    public void setTypes(List<MessageType> types) { this.types = types; }
    
    public List<MessageStatus> getStatuses() { return statuses; }
    public void setStatuses(List<MessageStatus> statuses) { this.statuses = statuses; }
    
    public List<MessagePriority> getPriorities() { return priorities; }
    public void setPriorities(List<MessagePriority> priorities) { this.priorities = priorities; }
    
    public String getSender() { return sender; }
    public void setSender(String sender) { this.sender = sender; }
    
    public String getRecipient() { return recipient; }
    public void setRecipient(String recipient) { this.recipient = recipient; }
    
    public String getSubject() { return subject; }
    public void setSubject(String subject) { this.subject = subject; }
    
    public LocalDateTime getStartTime() { return startTime; }
    public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; }
    
    public LocalDateTime getEndTime() { return endTime; }
    public void setEndTime(LocalDateTime endTime) { this.endTime = endTime; }
    
    public int getLimit() { return limit; }
    public void setLimit(int limit) { this.limit = limit; }
    
    public int getOffset() { return offset; }
    public void setOffset(int offset) { this.offset = offset; }
    
    public String getSortBy() { return sortBy; }
    public void setSortBy(String sortBy) { this.sortBy = sortBy; }
    
    public boolean isAscending() { return ascending; }
    public void setAscending(boolean ascending) { this.ascending = ascending; }
}
